package com.indusfo.spc.client.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.indusfo.spc.client.mapper.ClientBadphenoMapper;
import com.indusfo.spc.client.service.ClientBadphenoService;
import com.indusfo.spc.pojo.Badcause;
import com.indusfo.spc.pojo.Badpheno;
import com.indusfo.spc.pojo.Badreply;

/**
 * 客户端批次报工
 * 
 * @author zhengd
 *
 */
@Service
public class ClientBadphenoServiceImpl implements ClientBadphenoService {
	@Autowired
	private ClientBadphenoMapper clientBadphenoMapper;

	/**
	 * 根据不良现象查询不良原因
	 */
	@Override
	public List<Badcause> queryBadcauseByBadpheno(Integer badphenoId) {
		return clientBadphenoMapper.queryBadcauseByBadpheno(badphenoId);
	}

	/**
	 * 根据不良现象查询不良对策
	 */
	@Override
	public List<Badreply> queryBadreplyByBadpheno(Integer badphenoId) {
		return clientBadphenoMapper.queryBadreplyByBadpheno(badphenoId);
	}

	/**
	 * 根据批次ID和工位查询不良现象
	 */
	@Override
	public List<Badpheno> queryBadphenoByBatchId(Integer batchId, Integer stationId) {
		return clientBadphenoMapper.queryBadphenoByBatchId(batchId, stationId);
	}

}
